<div ng-controller="checkOutCtr">
	<h2>您的购物车</h2>
	<div class="alert alert-warning" ng-show="cartsArray.length==0">这里没有商品<a href="#/products">点击这里返回购物</a></div>
	<table class="table table-hover" ng-hide="cartsArray.length==0">
		<thead>
			<th>商品名称</th>
			<th class="text-center">单价</th>
			<th class="text-center">数量</th>
			<th class="text-center">小计</th>
			<th class="text-center">删除</th>
		</thead>
		<tbody>
			<tr ng-repeat="p in cartsArray">
				<td>{{p.product.name}}</td>
				<td class="text-center">{{p.product.price}}</td>
				<td class="text-center">{{p.num}}</td>
				<td class="text-center">{{p.num * p.product.price | currency:"￥"}}</td>
				<td class="text-center"><a class="btn btn-danger" ng-click="deleteProductsFromCarts(p)">删除</a></td>
			</tr>
		</tbody>
	</table>
</div>
